<page-header [action]="phActionTpl">
  <ng-template #phActionTpl>
    <!-- <button (click)="add()" nz-button nzType="primary">新建</button> -->
  </ng-template>
</page-header>
<nz-card>
  <!-- <sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
  <st #st [data]="url" [columns]="columns"></st> -->
  <form nz-form [formGroup]="validateForm">
    <nz-form-item >
      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="username">{{'user.account'|translate}}</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <input nz-input [(ngModel)]="user.username" [ngModelOptions]="{standalone: true}" [disabled]="true" id="username" name="username"/>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
        <nz-form-label class="back-gauge" [nzSm]="6" [nzXs]="24" nzRequired>{{'login.password'|translate}}</nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24">
          <input nz-input formControlName="password" type="password" [(ngModel)]="user.password" placeholder="{{'please.enter.new.password'|translate}}" id="password" name="password"/>
          <nz-form-explain *ngIf="validateForm.get('password')?.dirty && validateForm.get('password')?.errors">
            {{'please.enter.your.password'|translate}}
          </nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    <nz-form-item>
      <nz-form-label class="back-gauge" [nzSm]="6" [nzXs]="24" nzRequired>{{'confirm.password'|translate}}</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <input nz-input formControlName="repassword" type="password" [(ngModel)]="user.repassword" id="repassword" name="repassword"/>
        <nz-form-explain *ngIf="validateForm.get('repassword')?.dirty && validateForm.get('repassword')?.errors">
          <ng-container *ngIf="validateForm.get('repassword')?.hasError('required')">
            {{'please.enter.your.login.password.again'|translate}}
          </ng-container>
          <ng-container *ngIf="validateForm.get('repassword')?.hasError('confirm')">
            {{'inconsistent.password.input.twice'|translate}}
          </ng-container>
        </nz-form-explain>
      </nz-form-control>
    </nz-form-item>
    
    <nz-form-item >
      <nz-form-label [nzSm]="6" [nzXs]="24" [nzNoColon]=true></nz-form-label>
      
      <nz-form-control [nzSm]="14" [nzXs]="24"><button nz-button nzType="primary" (click)="save()" [nzLoading]="saveLoading"><span>{{'determine'|translate}}</span></button></nz-form-control>
    </nz-form-item>
  </form>
</nz-card>
